package com.yc.edu.service;

import com.yc.edu.pojo.PostComments;
import com.yc.edu.pojo.Result;
import com.yc.edu.utils.PageUtils;
import com.yc.edu.vo.PostWriteComment;
import com.yc.edu.vo.PostWriteForm;

import java.util.List;
import java.util.Map;

/**
 * @author YC
 * @version 1.0
 */
public interface PostService {
    // 获取所有帖子(分页)
    public PageUtils queryPage(Map<String, Object> params);

    // 查询相关帖子
    public PageUtils queryInfo(Map<String, Object> params);

    // 写一篇帖子
    public Result write(PostWriteForm postWriteForm);

    // 回复
    public Result comment(PostWriteComment postWriteComment, Integer recommend);

    // 查看所有回复
    public List<PostComments> getAllComments(String postId);

    // 查看帖子详细内容 (显示全文)
    public String getDetaiContent(String postId);

    // 收藏某个帖子
    public void collectForPost(String postId, Integer count);

    // 给某个帖子点赞
    public void zanForPost(String postId, Integer count);

    // 给某个回复点赞
    public void zanForComment(String commentId, Integer count);
}
